x_max = 2*pi;
N1 = 10;
N2 = 100;
mu = -0.5;
max_iter1 = 20;
max_iter2 = 200;
LF_errmax1 = zeros(1,max_iter1+1);
u = initial_data(N1,x_max);
for i = 1:max_iter1
    u = Lax_Wendroff_onestep(u,N1,mu);
    exact_u = exact_solution(N1,mu,x_max,i);
    LF_errmax1(i+1) = err(u,exact_u,-1,x_max);
end
LF_errmax2 = zeros(1,max_iter2+1);
u = initial_data(N2,x_max);
for i = 1:max_iter2
    u = Lax_Wendroff_onestep(u,N2,mu);
    exact_u = exact_solution(N2,mu,x_max,i);
    LF_errmax2(i+1) = err(u,exact_u,-1,x_max);
end
plot_fig2(LF_errmax1,LF_errmax2,N1,N2,mu,x_max)